@extends('admin/layout/main')

@section('content')
    <a href="{{ url('admin/admin/index') }}" class="btn btn-primary" style="float:right;margin-bottom:20px">返回</a>

    <form class="form-horizontal" style="clear:both" action="{{ url('admin/admin/update/' . $user['id']) }}" method="post">
        <div class="form-group">
            <label for="inputEmail3" class="col-sm-2 control-label">管理员姓名</label>
            <div class="col-sm-10">
                <input type="text" name="name" class="form-control" id="inputEmail3" placeholder="姓名" value="{{ $user['name'] }}">
                <p class="help-block" style="color:red;">{{ $errors->first('name') }}</p>
            </div>
        </div>
        <div class="form-group">
            <label for="inputPassword3" class="col-sm-2 control-label">管理员密码</label>
            <div class="col-sm-10">
                <input type="password" name="password" class="form-control" id="inputPassword3" placeholder="密码">
                <p class="help-block" style="color:red;">{{ $errors->first('password') }}</p>
            </div>
        </div>
        <div class="form-group">
            <label for="inputPassword4" class="col-sm-2 control-label">确认密码</label>
            <div class="col-sm-10">
                <input type="password" name="notpass" class="form-control" id="inputPassword4" placeholder="确认密码">
                <p class="help-block" style="color:red;">{{ $errors->first('notpass') }}</p>
            </div>
        </div>
        <div class="form-group">
            <label for="inputPassword5" class="col-sm-2 control-label">电子邮箱</label>
            <div class="col-sm-10">
                <input type="email" name="email" class="form-control" id="inputPassword5" placeholder="电子邮箱" value="{{ $user['email'] }}">
                <p class="help-block" style="color:red;">{{ $errors->first('email') }}</p>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <button type="submit" class="btn btn-default">确认</button>
            </div>
        </div>
        <input type="hidden" name="_token" value="{{ csrf_token() }}">
        <input type="hidden" name="hid" value="{{ $user['id'] }}"/>
    </form>
@endsection